﻿using Windows.SeedWork;

namespace Windows.WorkFlow.Domain
{
    /// <summary>
    /// 任务实例(用户任务节点)
    /// </summary>
    public class Task : Entity
    {
        public Task() 
        {
            Master_Tasks = new HashSet<Master_Task>();
        }
        public string NodeId { get; set; }
        public string NodeName { get; set; } = "";
        /// <summary>
        /// 签收人或转发人
        /// </summary>
        public long AssigneeId { get; set; }
        public string AssigneeName { get; set; } = "";
        /// <summary>
        /// 实际签收人（一般情况下为空，只有在转发时才有值）
        /// </summary>
        public long? OwnerId { get; set; }
        public string? OwnerName { get; set; }
        public int Status { get; set; }
        /// <summary>
        /// 处理意见
        /// </summary>
        public string? Comment { get; set; }
        public DateTime StartOn { get; set; } = DateTime.Now;
        public DateTime? EndOn { get; set; }
        public long ExecutionId { get; set; }
        public virtual Execution? Execution { get; set; }
        public virtual ICollection<Master_Task> Master_Tasks { get; set; }
    }
}
